import request from '@/plugin/axios'
import util from '@/libs/util.js'

const getProjectTree =   function getProjectTree(ParentId) {
    let data = {};
    data.ParentId = ParentId
    data.UserId = util.cookies.get('uuid')
    return request({
        url: '/User/Child',
        method: 'post',
        data
    })
}
const getProjectTreeProject =   function getProjectTreeProject(UserId) {
    let data = {};
    if(UserId){
        data.UserId = UserId
    }else {
        data.UserId = util.cookies.get('uuid')
    }

    return request({
        url: '/Project/List4Tree',
        method: 'post',
        data
    })
}
export {
    getProjectTreeProject,
    getProjectTree,
}
